﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using Telerik.VersionsInAction;
using Telerik.VersionAttribute;

namespace MethodVersionExtracting
{
    class MethodVersionExtracting
    {
        static void Main(string[] args)
        {
            MethodInfo method = typeof(VersionsInAction).GetMethod("MethodWithVersion");
            object[] attributes = method.GetCustomAttributes(false);
            VersionAttribute MethodWithVersionVersion = ((VersionAttribute)attributes[0]);
            Console.WriteLine(string.Format("The version of MethodWithVersion is {0}.", MethodWithVersionVersion.VersionName));
        }
    }
}
